<#include "../base.ftl"/>

<#macro title>
物流交易系统
</#macro>
<#macro cssfile>
</#macro>
	      
<#macro scriptfile>
</#macro>
<#macro jsscript>
$(function(){
    
	$("#price").removeAttr().val("");
	$("#weight").removeAttr().val("");
	$("#volume").removeAttr().val("");
	$("#age").removeAttr().val("");
	$("#time").removeAttr().val("");
	$("#insurance").removeAttr().val("");
	$("#remark").removeAttr().val("");
	$("#arriveTime").removeAttr().val("");
})


    addressInit('cmbProvince', 'cmbCity', 'cmbArea', '北京', '市辖区', '东城区');
	addressInit('Select1', 'Select2', 'Select3');
	
	
	
	$('#submit').click(function(){
       var transport=$("#transport").val();
       var load=$("#load").val();
       var qualification=$("#qualification").val();
       var measure=$("#measure").val();
       var price=$("#price").val();
       var weight=$("#weight").val();
       var volume=$("#volume").val();
       var age=$("#age").val();
       var time=$("#time").val();
       var cmbProvince=$("#cmbProvince").val();
       var cmbCity=$("#cmbCity").val();
       var cmbArea=$("#cmbArea").val();
       var insurance=$("#insurance").val();
       var Select1=$("#Select1").val();
       var Select2=$("#Select2").val();
       var Select3=$("#Select3").val();
       var remark=$("#remark").val();
       var arriveTime=$("#arriveTime").val();
       $.ajax({
              url: '${request.contextPath}/operator/tlt/TltLogisticsSupply/operator.html', 
    	      type:'post',
              data:{"oper":"add","transportMode":transport,'loadMode':load,'transportQualification':qualification,'unitPrice':price,'unit':measure,'maxLoadWeight':weight,'maxLoadVolume':volume,'currentAddress':cmbProvince+'省'+cmbCity+cmbArea,'age':age,'insurance':insurance,'planDestination':Select1+'省'+Select2+Select3,'planDate':time,'remark':remark,'arriveDate':arriveTime},
              dataType : 'json',
              success:function(result){
        	      alert(result.message);
               },
             'error':function(xhr,e1,e2){
    	             alert("操作有误");
               }
           });
       
        
    });
</#macro>
<#macro main>
	<div class="span12" style="margin-top: 20px;">
        <legend class="" align="center">新增信息</legend>
		<table class="table table-bordered">
              <tbody>
                <tr>
                  <td>
                  		<div class="control-group form-horizontal">
                    	<label class="control-label">运输方式</label>
                    <div class="controls">
                        <select class="input-xlarge" style="width:285px;" id="transport">
                            <option>水运</option>
                            <option>陆运</option>
                            <option>空运</option>
                        </select>
                    </div>
                		</div>
                  </td>
                  <td>
                  		<div class="control-group form-horizontal">
                    	<label class="control-label">装载方式</label>
                    <div class="controls">
                        <select class="input-xlarge" style="width:285px;" id="load">
                            <option>集装箱</option>
                            <option>散货</option>
                        </select>
                    </div>
                		</div>
                  </td>
                </tr>
                <tr>
                  <td>
                  		<div class="control-group form-horizontal">
                    	<label class="control-label">运输资质</label>
                    <div class="controls">
                        <select class="input-xlarge" style="width:285px;" id="qualification">
                            <option>非危品</option>
                            <option>危险品</option>
                            <option>冷货</option>
                        </select>
                    </div>
                		</div>
                  </td>
                  <td>
                  		<div class="control-group form-horizontal">
                    	<label class="control-label">计量单位</label>
                    <div class="controls">
                        <select class="input-xlarge" style="width:285px;" id="measure">
                            <option>吨</option>
                            <option>20GP/F</option>
                            <option>40GP/F</option>
                        </select>
                    </div>
                		</div>
                  </td>
                </tr>
                <tr>
                  <td>
                  		<div class="control-group form-horizontal">
                    	<!-- Text input-->
                        <label class="control-label" for="input01">单价</label>
                        <div class="controls">
                            <input id="price" placeholder="单价" class="input-xlarge" type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))"/>
                        </div>
                		</div>
                  </td>
                  <td>
                  		<div class="control-group form-horizontal">
                    	<!-- Text input-->
                        <label class="control-label" for="input01">最大承载重量</label>
                        <div class="controls">
                            <input id="weight" placeholder="最大承载重量" class="input-xlarge" type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))"/>
                            <span><font color="#ff0000" size="2">&nbsp;&nbsp;吨</font></span>
                        </div>
                		</div>
                  </td>
                </tr>
                <tr>
                  <td>
                  		<div class="control-group form-horizontal">
                    	<!-- Text input-->
                        <label class="control-label" for="input01">最大承载体积</label>
                        <div class="controls">
                            <input id="volume" placeholder="最大承载体积" class="input-xlarge" type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))"/>
                            <span><font color="#ff0000" size="3">&nbsp;&nbsp;m³</font></span>
                        </div>
                		</div>
                  </td>
                  <td>
                  		<div class="control-group form-horizontal">
                    	<!-- Text input-->
                        <label class="control-label" for="input01">车/船龄</label>
                        <div class="controls">
                            <input id="age" placeholder="车/船龄" class="input-xlarge" type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))"/>
                            <span><font color="#ff0000" size="2">&nbsp;&nbsp;年</font></span>
                        </div>
                		</div>
                  </td>
                </tr>
                <tr>
                 <td>
                  		<div class="control-group form-horizontal">
                    	<!-- Text input-->
                        <label class="control-label" for="input01">预计承载时间</label>
                        <div class="controls">
                            <input id="time" class="Wdate" type="text" onFocus="WdatePicker({minDate:'%y-%M-{%d}'})"/>
                        </div>
                		</div>
                  </td>
                  <td>
                  		<div class="control-group form-horizontal">
                    	<label class="control-label">目前所在地</label>
                    <div class="controls">
                                                                            省&nbsp;&nbsp;
                         <select name="zy" class="span3" id="cmbProvince">
                                       </select>
                                                                         &nbsp;&nbsp;市
                        <select name="zy" class="span3" id="cmbCity">
                                       </select>&nbsp;&nbsp;区
                       <select name="zy" class="span3" id="cmbArea">
                                       </select>
                    </div>
                    
                		</div>
                  </td>
                </tr>
                <tr>
                <td>
                  		<div class="control-group form-horizontal">
                    	<!-- Text input-->
                        <label class="control-label" for="input01">预计到达时间</label>
                        <div class="controls">
                               <input id="arriveTime" class="Wdate" type="text" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'time\')}',maxDate:'2020-10-01'})"/>                        </div>
                		</div>
                  </td>
                
                  <td>
                  		<div class="control-group form-horizontal">
                    	<label class="control-label">计划目的地</label>
                    <div class="controls">
                                                                            省&nbsp;&nbsp;
                         <select name="zy" class="span3" id="Select1">
                                       </select>
                                                                         &nbsp;&nbsp;市
                        <select name="zy" class="span3" id="Select2">
                                       </select>
                                                                       &nbsp;&nbsp;区
                       <select name="zy" class="span3" id="Select3">
                                       </select>
                    </div>
                    
                		</div>
                  </td>
                </tr>
                <tr>
                <td>
                  		<div class="control-group form-horizontal">
                    	<!-- Text input-->
                        <label class="control-label" for="input01">保险情况</label>
                        <div class="controls">
                            <input id="insurance" placeholder="保险情况" class="input-xlarge" type="text">
                        </div>
                		</div>
                  </td>
                  <td>
                  		<div class="control-group form-horizontal">
                    	<!-- Textarea-->
                        <label class="control-label" for="input01">备注</label>
                        <div class="controls">
                        <div class="textarea">
                            <textarea type="" class="" style="width:270px;" id="remark"> </textarea>
                        </div>
                    </div>
                		</div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">
                  		<button class="btn btn-large btn-block btn-primary" type="button" id="submit">提交</button>
                  </td>
                </tr>
              </tbody>
            </table>

        </div><!--/span-->
</#macro>